/**
 * @ClassName ArraySuper
 * @Description TODO
 * @Author Admin
 * @Date 2021/6/25 10:24
 * @Version 1.0
 */
public class ArraySuper {
    int size;
    int y;
    int [] array=new int[y];

    public ArraySuper(int y) {
        this.y = size;
    }

    public void  add(int data){
        if (size<array.length){
            array[size]=data;
            size++;
            }
        else {
            int[]temp=new int[array.length*2];
            temp=array;
            temp[size]=data;
            array=temp;
            size++;
        }

    }
    public void prin(){
        if (size>0){
            for (int a:array) {
                System.out.print(a);
                
            }

            System.out.println();
        }


    }


    }


